package com.ruoyi.network.handler;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.alibaba.fastjson.JSONObject;
import com.ruoyi.network.domain.NetworkEdge;
import com.ruoyi.network.service.INetworkEdgeService;
@Component
public class NetworkEventHandler90003 implements NetworkEventHandler{
	@Autowired
	private INetworkEdgeService networkEdgeService;
	@Override
	public void invoke(JSONObject message) throws Exception {
		String terminateId = message.getJSONObject("param").getString("terminateId");
		NetworkEdge bean = networkEdgeService.selectById(terminateId);
		if(bean != null) {
			bean.setOnline(0);
			networkEdgeService.update(bean);
		}
	}
	
}
